import typing
from PyQt5.QtWidgets import QApplication,QWidget,QPushButton
from PyQt5 import QtCore
import sys

from ui.Ui_my_widget_ import Ui_MyWidget

class MyWidget(QWidget):

    def __init__(self):
        super().__init__()
    
        self.ui = Ui_MyWidget()
        self.ui.setupUi(self)
        
        self.init_ui()

    def on_btn_send_click(self):
        print("按钮被点击")
    
    def init_ui(self):
        self.ui.bin_send.clicked.connect(self.on_btn_send_click)
        
    
    
if __name__ == '__main__':
    
    # 1.创建应用程序
    app = QApplication(sys.argv)
    
    # 2.创建窗口
    w = MyWidget()

    # 3.显示窗口
    w.show()
    # 4.等待窗口停止
    sys.exit(app.exec())